%if defined('login'):
    %include Base/header name=login
%else:
    %include Base/header
%end
        <div class="col-md-9">
            <div class="jumbotron">

                        <h3><p class="text-center"><strong>{{theme}}</strong></p></h3>
                        <hr>
                        <p class="text-left">{{text}}</p>
                        %if defined('url'):
                            <p class="text-right" style="font-size: 15px"><a href=/static/files/{{url}}>{{url}}</a></p>
                        %end
                        <hr>
                            <h6>
                            %if defined('creator'):
                                <div class="text-left">Тикет №{{_id}}. Cоздан {{date}} пользователем {{user}}. Статус <div onclick=dropdown_action() id="buttonstatus" class="label label-{{_type}}" topik_id="{{_id}}" data-toggle="dropdown" style="font-size: 140%;">{{statustext}}</div>
                                    <div onclick=send_change_topik_status()  class="label label-primary dropdown-toggle" style="font-size: 140%;" >Изменить</div>
                                    <div class="btn-group" id="topic_status">
                                            <ul class="dropdown-menu">
                                                <li><a onclick=change_button_status(this) color="success" name='open'>{{creator['open']['text']}}</a></li>
                                                <li><a onclick=change_button_status(this) color="danger" name='close'>{{creator['close']['text']}}</a></li>
                                                <li><a onclick=change_button_status(this) color="warning" name='inprogress'>{{creator['inprogress']['text']}}</a></li>
                                                <li><a onclick=change_button_status(this) color="info" name='delay'>{{creator['delay']['text']}}</a></li>
                                            </ul>
                                    </div>
                                </div>
                            %else:
                                <div class="text-left">Тикет №{{_id}}. Cоздан {{date}} пользователем {{user}}. Статус <div class="label label-{{_type}}" style="font-size: 140%;">{{statustext}}</div></div>
                            %end
                            </h6>
            </div>
            %if defined('comments'):
                %for comment in comments:
                <div class="jumbotron" style="padding-top: 2px; padding-bottom: 1px;">
                            <p class="text-left" style="font-size: 16px">{{comment[2]}}</p>
                            <p class="text-right" style="font-size: 10px">{{comment[0]}}: {{comment[1]}}</p>

                 </div>
                %end
            %end
            %if defined('login'):
            <div id="createforms" class="jumbotron-logrus">
                  <form class="form-horizontal" action="/bugreport/addcomment" method="post" enctype="multipart/form-data">
                      <textarea name="comment" class="form-control" rows="3" style="width:95%; height:150px"></textarea>
                      <input type="hidden" name=id value={{_id}}>
                      <button class="btn btn-primary btn-sm" type="submit">Высказаться</button>
                  </form>
            </div>
            %end
       </div>

    </div>
 </div>
</div>
%include Base/footer